
import request from '@/utils/request'

//获取分组列表
export function getTreeList(query) {
  return request({
    url: `/act/model-group/getTreeList`,
    method: 'get'
  })
}
//保存流程分组
export function save(data) {
  return request({
    url: '/act/model-group/save',
    method: 'post',
    data: data
  })
}
//删除分组
export function deleteGroup(data) {
  return request({
    url: `/act/model-group/delete/${data}`,
    method: 'delete'
  })
}
//新建流程
export function saveModel(data) {
  return request({
    url: '/act/model-info/save',
    method: 'post',
    data
  })
}
//获取流程列表数据
export function getModelList(data) {
  return request({
    url: '/act/model-info/queryPage',
    method: 'get',
    params: data
  })
}
//批量移动
export function modelMove(data) {
  return request({
    url: '/act/model-info/move',
    method: 'post',
    data
  })
}
//批量删除
export function modelDelete(data) {
  return request({
    url: '/act/model-info/delete',
    method: 'delete',
    data
  })
}
//版本列表
export function queryVersionList(data) {
  return request({
    url: `/act/model-version/queryList/${data}`,
    method: 'get'
  })
}
//版本分页列表
export function queryVersionPageList(data) {
  return request({
    url: `/act/model-version/queryPage`,
    method: 'get',
    params: data
  })
}
//新建版本
export function createVersion(data) {
  return request({
    url: `/act/model-version/create`,
    method: 'post',
    data
  })
}
//保存版本基本信息
export function saveBaseInfo(data) {
  return request({
    url: `/act/model-version/saveBaseInfo`,
    method: 'post',
    data
  })
}
//流程绑定表单
export function formBinding(data) {
  return request({
    url: `/act/model-version/formBinding`,
    method: 'post',
    data
  })
}
//删除版本
export function versionDelete(data) {
  return request({
    url: `/act/model-version/delete/${data}`,
    method: 'delete'
  })
}
//启用/停用接口
export function switchOperateState(data) {
  return request({
    url: `/act/model-version/switch`,
    method: 'put',
    data
  })
}
//
export function processCopy(data) {
  return request({
    url: `/act/model-info/copy`,
    method: 'post',
    data
  })
}

//模型关联事项
export function matterBinding(data) {
  return request({
    url: `/act/model-version/matterBinding`,
    method: 'post',
    data
  })
}










